<%@ page language="C#" autoeventwireup="true" inherits="Manage_QuickAdd_EmpPay, App_Web_emppay.aspx.d5266f9f" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
	<LINK href="../css.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<script language="javascript" src="../../js/jslib.js" type="text/javascript"></script>
<script language=javascript>
function Check1() {
var vdlPayment=document.getElementById("dlPayment");
var vtxtAmount=document.getElementById("txtAmount");

if( vdlPayment.value.length == 0 ){
alert("Field 'Payment' is not valid!");
vdlPayment.focus();
return false;
}					
if( vtxtAmount.value.length == 0 ){
alert("Field 'Change amount to' is not valid!");
vtxtAmount.focus();
return false;
}					
if(!chknum(vtxtAmount.value)) {
alert(" Field 'Change amount to' is not valid!");
vtxtAmount.focus();
return false;
}	
		
return true;
}

function Check2() {
var vtxtPaymentDate=document.getElementById("txtPaymentDate");
var vtxtPaymentAmount=document.getElementById("txtPaymentAmount");
var vdlAccount=document.getElementById("dlAccount");

if( vtxtPaymentDate.value.length == 0 ){
alert("Field 'Payment Date' is not valid!");
vtxtPaymentDate.focus();
return false;
}				
if(!chkdate2(vtxtPaymentDate.value)) {
alert(" Field 'Payment Date' is not valid!");
vtxtPaymentDate.focus();
return false;
}					
if( vtxtPaymentAmount.value.length == 0 ){
alert("Field 'Payment Amount' is not valid!");
vtxtPaymentAmount.focus();
return false;
}				
if(!chknum(vtxtPaymentAmount.value)) {
alert(" Field 'Payment Amount' is not valid!");
vtxtPaymentAmount.focus();
return false;
}				
if( vdlAccount.value.length == 0 ){
alert("Field 'Select from Account' is not valid!");
vdlAccount.focus();
return false;
}	
		
return true;
}

function Check3() {
var vdlPayment2=document.getElementById("dlPayment2");

if( vdlPayment2.value.length == 0 ){
alert("Field 'Payment' is not valid!");
vdlPayment2.focus();
return false;
}	
		
return confirm('Are you sure you would like to delete this payment?');
}

function Check4() {
var vtxtBankName=document.getElementById("txtBankName");
var vtxtBranch=document.getElementById("txtBranch");
var vtxtAccountName=document.getElementById("txtAccountName");

if( vtxtBankName.value.length == 0 )
{
alert("Field 'Bank Name' is not valid!");
vtxtBankName.focus();
return false;
}					
if( vtxtBranch.value.length == 0 )
{
alert("Field 'Branch' is not valid!");
vtxtBranch.focus();
return false;
}					
if( vtxtAccountName.value.length == 0 )
{
alert("Field 'Account Name' is not valid!");
vtxtAccountName.focus();
return false;
}		
		
return true;
}
</script>
</head>
<body topmargin="0" leftmargin="0">
    <form id="form1" runat="server">
        <asp:ScriptManager id="ScriptManager1" runat="server">
        </asp:ScriptManager>
    <table width="99%" align="center"  border="0" cellspacing="0" cellpadding="0" class="NormalText">
  <tr>
    <td height="40" colspan="2" class="HeadText">Payments</td>
  </tr>
    <tr>
  <td colspan="2" align="center">  
<TABLE cellSpacing=0 cellPadding=0 width=90% border=0><TBODY>
  <TR>
    <TD height=22><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
    <td width="25%" height="22"><div align="left">Employee Name:</div></td>
    <td><div align="left"><%=EmpName%></div></td>
  </tr>
  <tr>
    <td height="22"><div align="left">Our Ref:</div></td>
    <td><div align="left"><%=Sid%></div></td>
  </tr>
  <tr>
    <td height="22"><div align="left">Employee ID:</div></td>
    <td><div align="left"><%=OrgEmpSid%></div></td>
  </tr>

    </table></TD>
  </TR>
  <TR>
    <TD height=15></TD>
  </TR>
  <TR><TD height=22><div align="left">Please select the type of change you would like to make to this employee&rsquo;s schedule:</div></TD></TR><TR><TD align="left"><asp:RadioButtonList id="RadioButtonList1" runat="server" OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" AutoPostBack="True">
              <asp:ListItem Value="0">Change this employee&rsquo;s debit amount</asp:ListItem>
              <asp:ListItem Value="1">Add an additional payment</asp:ListItem>
              <asp:ListItem Value="2">Delete a scheduled payment</asp:ListItem>
              <asp:ListItem Value="3">Add Nominated Bank</asp:ListItem>
              <asp:ListItem Value="5">Added Nominated Bank</asp:ListItem>
              <asp:ListItem Value="4">Change this employee&rsquo;s status</asp:ListItem>
          </asp:RadioButtonList> </TD></TR><TR><TD><TABLE id="TABLE1" cellSpacing=0 cellPadding=0 width="100%" border=0 runat="server"><TBODY><TR><TD style="HEIGHT: 22px"></TD></TR><TR><TD height=22 align="left">Please select the payment that you wish to change the amount of: 
              <asp:DropDownList ID="dlPayment" runat="server">
              </asp:DropDownList></TD></TR><TR><TD style="height: 22px" align="left">Change amount to: $ 
              <asp:TextBox ID="txtAmount" runat="server"></asp:TextBox></TD></TR><TR><TD height=22 align="left"><asp:CheckBox id="cbPayment" runat="server"></asp:CheckBox>Also apply this change to all future payments after the selected payment.</TD></TR><TR><TD align=center height=25><asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Submit Update" CssClass="submitBtn"></asp:Button></TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE id="TABLE2" cellSpacing=0 cellPadding=0 width="100%" border=0 runat="server"><TBODY><TR><TD colSpan=4 height=22></TD></TR><TR><TD style="HEIGHT: 24px" width="20%"><div align="left">Payment Date:</div></TD><TD style="HEIGHT: 24px" align="left"><asp:TextBox id="txtPaymentDate" runat="server" onclick="this.value='';">dd/mm/yyyy</asp:TextBox></TD><TD style="HEIGHT: 24px" width="20%"><div align="left">Payment Amount:</div></TD><TD style="HEIGHT: 24px" align="left"><asp:TextBox id="txtPaymentAmount" runat="server"></asp:TextBox></TD></TR><TR><TD colSpan=4 height=22 align="left">Select from Account: 
                <asp:DropDownList id="dlAccount" runat="server"></asp:DropDownList></TD></TR><TR><TD style="LINE-HEIGHT: 130%" colSpan=4><div align="left">Please note: If your new payment date fall on a public holiday the payment date will be shifted to the next available working day. </div></TD></TR><TR><TD align=center colSpan=4 height=25><asp:Button id="Button2" onclick="Button2_Click" runat="server" Text="Submit Update" CssClass="submitBtn"></asp:Button>                  &nbsp;</TD></TR></TBODY></TABLE></TD></TR><TR><TD><TABLE id="TABLE3" cellSpacing=0 cellPadding=0 width="100%" border=0 runat="server"><TBODY><TR><TD height=22></TD></TR><TR><TD height=22 align="left">Delete payment <asp:DropDownList ID="dlPayment2" runat="server">
              </asp:DropDownList>from this employee&rsquo;s payment schedule.</TD></TR><TR><TD align=center height=25><asp:Button id="Button3" onclick="Button3_Click" runat="server" Text="Submit Update" CssClass="submitBtn"></asp:Button> </TD></TR></TBODY></TABLE></TD></TR>
              <TR><TD>
              <TABLE id="TABLE4" cellSpacing=1 cellPadding=1 width="100%" border=0 runat="server"><TBODY><TR><TD colSpan=4 height=22></TD></TR><TR><TD style="HEIGHT: 26px" width="20%"><div align="left">Bank Name:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtBankName" runat="server" Width="200px"></asp:TextBox> 
              </div></TD></TR>
              <TR><TD style="HEIGHT: 26px" width="20%"><div align="left">Branch:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtBranch" runat="server" Width="200px"></asp:TextBox> 
              </div></TD></TR><TR><TD style="HEIGHT: 26px"><div align="left">Account Name:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtAccountName" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD height=22><div align="left">BSB:</div></TD><TD><div align="left">
                <asp:TextBox id="txtBsb" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD style="HEIGHT: 26px"><div align="left">Account Number:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtAccountNum" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD style="HEIGHT: 24px"><div align="left">Reference:</div></TD><TD style="HEIGHT: 24px"><div align="left">
                <asp:TextBox id="txtPayReference" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD align=center colSpan=2 height=22><asp:Button id="Button4" onclick="Button4_Click" runat="server" Text="Submit Update" CssClass="submitBtn"></asp:Button> 
              </TD></TR>
              </TBODY></TABLE>
              </TD></TR>
              
              <TR><TD>
              <TABLE id="TABLE6" cellSpacing=1 cellPadding=1 width="100%" border=0 runat="server">
              <TBODY>
              <TR><TD colSpan=4 height=22></TD></TR>
              
              <tr>
              <td colspan=2 align="left">
              <table width="100%"  border="0" cellpadding="1" cellspacing="1" bgcolor="#999999">
          <tr>
            <td height="22" bgcolor="#CCCCCC"><strong>Bank Name</strong></td>
            <td bgcolor="#CCCCCC"><strong>Branch</strong></td>
            <td bgcolor="#CCCCCC"><strong>Account Name</strong></td>
            <td bgcolor="#CCCCCC"><strong>BSB</strong></td>
            <td bgcolor="#CCCCCC"><strong>Account Number</strong></td>
            <td bgcolor="#CCCCCC"><strong>Reference</strong></td>
            <td bgcolor="#CCCCCC" align="center"><strong>Edit</strong></td>
            <td bgcolor="#CCCCCC" align="center"><strong>Delete</strong></td>
          </tr>
		 <%		 
             for (int i = 0; i < dtBankList.Rows.Count; i++)
             {
                 string BankSid = dtBankList.Rows[i]["Sid"].ToString();
                 string BankName = dtBankList.Rows[i]["BankName"].ToString();
                 string Branch = dtBankList.Rows[i]["Branch"].ToString();
                 string AccountName = dtBankList.Rows[i]["AccountName"].ToString();
                 string AccountNum = dtBankList.Rows[i]["AccountNum"].ToString();
                 string Bsb = dtBankList.Rows[i]["Bsb"].ToString();
                 string PayReference = dtBankList.Rows[i]["PayReference"].ToString();
         %> 
         <tr>
         <td height=22 bgcolor="#ffffff"><%=BankName%></td>
         <td bgcolor="#ffffff"><%=Branch%></td>
         <td bgcolor="#ffffff"><%=AccountName%></td>
         <td bgcolor="#ffffff"><%=Bsb%></td>
         <td bgcolor="#ffffff"><%=AccountNum%></td>
         <td bgcolor="#ffffff"><%=PayReference%></td>
         <td bgcolor="#ffffff" align="center"><a href="EmpPay.aspx?OrgSid=<%=OrgSid%>&EmpSid=<%=Sid%>&BankSid=<%=BankSid%>">Edit</a></td>
         <td bgcolor="#ffffff" align="center"><a href="EmpPayDel.aspx?OrgSid=<%=OrgSid%>&EmpSid=<%=Sid%>&BankSid=<%=BankSid%>" onclick="return confirm('really delete it?')">Delete</a></td>
         </tr>
		 <% }%>
        </table>
              </td>
              </tr>
              <TR><TD style="HEIGHT: 26px" width="20%"><div align="left">Bank Name:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtBankName2" runat="server" Width="200px"></asp:TextBox> 
              </div></TD></TR>
              <TR><TD style="HEIGHT: 26px" width="20%"><div align="left">Branch:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtBranch2" runat="server" Width="200px"></asp:TextBox> 
              </div></TD></TR><TR><TD style="HEIGHT: 26px"><div align="left">Account Name:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtAccountName2" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD height=22><div align="left">BSB:</div></TD><TD><div align="left">
                <asp:TextBox id="txtBsb2" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD style="HEIGHT: 26px"><div align="left">Account Number:</div></TD><TD style="HEIGHT: 26px"><div align="left">
                <asp:TextBox id="txtAccountNum2" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD style="HEIGHT: 24px"><div align="left">Reference:</div></TD><TD style="HEIGHT: 24px"><div align="left">
                <asp:TextBox id="txtPayReference2" runat="server" Width="200px"></asp:TextBox>
              </div></TD></TR><TR><TD align=center colSpan=2 style="height: 22px"><asp:Button id="Button6" runat="server" Text="Submit Update" CssClass="submitBtn" OnClick="Button6_Click"></asp:Button> 
              </TD></TR>
              </TBODY></TABLE>
              </TD></TR>
              
              <TR><TD><TABLE id="TABLE5" cellSpacing=0 cellPadding=0 width="100%" border=0 runat="server"><TBODY><TR><TD colSpan=4 height=22></TD></TR><TR><TD width="50%" height=22 align="left">Current Status:<%=EmpStatus%></TD><TD align="left">Change To: <asp:DropDownList id="dlStatus" runat="server"><asp:ListItem Value="1">Active</asp:ListItem>
<asp:ListItem Value="0">Terminated</asp:ListItem>
</asp:DropDownList></TD></TR><TR><TD align=center colSpan=4 height=22><asp:Button id="Button5" onclick="Button5_Click" runat="server" Text="Submit Update" CssClass="submitBtn"></asp:Button> </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>

  
  </td>
  </tr>
    <tr>
      <td height="26" colspan="2" align="center">
	  <a href="Payments.aspx">Return</a>
	  </td>
    </tr>
    <tr>
    <td height="22" colspan="2">
	<asp:Label ID="lblTip" runat="server"></asp:Label>
	</td>
  </tr>
</table>
    </form>
</body>
</html>
